package com.hzh.entity;

public class Order {

    private Integer oid;
    private String address;
    private Double total;
    private User user;  //包含了用户对象

    public Order() {
    }

    public Order(Integer oid, String address, Double total, User user) {
        this.oid = oid;
        this.address = address;
        this.total = total;
        this.user = user;
    }

    /**
     * 获取
     * @return oid
     */
    public Integer getOid() {
        return oid;
    }

    /**
     * 设置
     * @param oid
     */
    public void setOid(Integer oid) {
        this.oid = oid;
    }

    /**
     * 获取
     * @return address
     */
    public String getAddress() {
        return address;
    }

    /**
     * 设置
     * @param address
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 获取
     * @return total
     */
    public Double getTotal() {
        return total;
    }

    /**
     * 设置
     * @param total
     */
    public void setTotal(Double total) {
        this.total = total;
    }

    /**
     * 获取
     * @return user
     */
    public User getUser() {
        return user;
    }

    /**
     * 设置
     * @param user
     */
    public void setUser(User user) {
        this.user = user;
    }

    public String toString() {
        return "Order{oid = " + oid + ", address = " + address + ", total = " + total + ", user = " + user + "}";
    }
}
